/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.ingsoc2;

import com.mycompany.ingsoc2.SwingViews.VcNuevoViewSwing;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author sfreiman
 */
public class VcLstPrincipalMouse implements MouseListener {

    private VcPrincipalView pView;
    private VcPrincipalModel pModel;
    private VcNuevoController nuevoController;

    public VcLstPrincipalMouse(VcPrincipalView pView, VcPrincipalModel pModel) {
        this.pView = pView;
        this.pModel = pModel;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        try {
            
            this.nuevoController = new VcNuevoController(pView, new VcNuevoViewSwing(), pModel);
            this.nuevoController.mostrarPantalla();
            this.nuevoController.mostrarPelicula((int) pView.getSelectedPeliculaID().get(0));

        } catch (SQLException ex) {
            Logger.getLogger(VcLstPrincipalMouse.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    }

    @Override
    public void mouseExited(MouseEvent e) {
    }

}
